package com.supplychainapi.config;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.alibaba.druid.pool.DruidDataSourceStatLogger ;
import com.alibaba.druid.pool.DruidDataSourceStatLoggerAdapter;
import com.alibaba.druid.pool.DruidDataSourceStatValue;
import com.alibaba.fastjson.JSONObject;
public class DruidStatLogger extends DruidDataSourceStatLoggerAdapter implements DruidDataSourceStatLogger {

	private Logger logger = LogManager.getLogger(DruidStatLogger.class);
	
	@Override
	public void log(DruidDataSourceStatValue statValue) {
		logger.info("Druid stat info: " + JSONObject.toJSONString(statValue));
		super.log(statValue);
	}
	
}

